//redux核心管理对象store
import { createStore, applyMiddleware, compose } from "redux"
import reducers from "./reducers"
import thunk from "redux-thunk"



const composeEnhancers =
    typeof window === 'object' &&
        window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ ?
        window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({}) : compose;

const enhancer = composeEnhancers(
    applyMiddleware(thunk),
);


export default createStore(
    reducers,
    // applyMiddleware(thunk)
    enhancer
)